<?php
include_once '../library/config.php';
include_once '../model/stafflist.php';
include_once '../model/userlist.php';
include_once '../model/arealist.php';
StaffList::IsLogin();
$list = new AreaList();
$list->request();
?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <link href="/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="/css/layout.css" rel="stylesheet" type="text/css" />
        <title>后台管理系统</title>
    </head>
    <body>
        <form method="post" id="mainwrap">
            <h2 class="pagetitle">地址名称：<input type="text" name="area" value="<?php echo $list["action"]; ?>" class="w100" />
                <input type="hidden" name="action" value="" />
                <button type="submit">查询</button></h2>
            <div class="toolbar">
                <button type="button" transadapter="addeara" select="false">增加</button>
                <button type="button" transadapter="updatexinxi">修改</button>
                <button type="button" transadapter="deletexinxi">删除</button>

                <input type="hidden" id="transadapter" find="[name='myid']:checked" />
            </div>
            <div class="mainwrapassist nostatusbar">
                <table class="tc cellbor">
                    <thead>
                        <tr>
                            <th class="w30">选择</th>
                            <th class="w60">ID</th>
                            <th class="w60">名称</th>
                            <th class="w150">父级</th>

                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $list->pagesize = 13;
                        $list->select();
                        if ($list['area']) {
                            $list->where('mingcheng=?', array($list['area']));
                        }
                        $list->get_page_desc("id");
                        while ($list->for_in_rows()) {
                            ?>
                            <tr>
                                <td>
                                    <input type="radio" name="myid" value="<?php echo $list["id"]; ?>" /></td>

                                <td><?php echo $list["id"]; ?></td>
                                <td><?php echo $list["mingcheng"]; ?></td>
                                <td cengji=<?php echo $list["parentid"]; ?>></td>

                            </tr>
    <?php
}
?>
                    </tbody>
                </table>
            </div>
        </form>
<?php include_once '../inc/js.html'; ?>
        <script src="controller.js"></script>
    </body>
</html>
